package com.example.yk2021xm04;

import org.junit.jupiter.api.Test;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.context.annotation.Bean;
import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder;
import org.springframework.security.crypto.password.PasswordEncoder;

import javax.annotation.Resource;

/**
 * @author ZengQi
 * @description: TODO
 * @date 2021/12/10 0010 23:35
 */
@SpringBootTest
public class ToEncodePassword {
    @Resource
    private PasswordEncoder passwordEncoder;

    @Bean
    public PasswordEncoder encoder() {
        return new BCryptPasswordEncoder();
    }

    @Test
    void contextLoads() {
        System.out.println(passwordEncoder.encode("123"));
        System.out.println(passwordEncoder.encode("111"));
        System.out.println(passwordEncoder.encode("123456"));
        System.out.println(passwordEncoder.encode("1"));
        System.out.println(passwordEncoder.encode("1231"));
        System.out.println(passwordEncoder.encode("mb0154nqv8y"));
        System.out.println(passwordEncoder.encode("ppnnssy1234"));
        System.out.println(passwordEncoder.encode("12345678"));
        System.out.println(passwordEncoder.encode("2529382390"));
        System.out.println(passwordEncoder.encode("123456aA"));
        System.out.println(passwordEncoder.encode("hjchjchjc1"));
        System.out.println(passwordEncoder.encode("55555"));

    }

}
